Package lemon :: Package html :: Package template :: Module dreamweaverMX :: Class Page
[show private | hide private]
[frames | no frames]

Class Page


Class to parse Macromedia Dreamweaver MX Template files

Method Summary
  __init__(self, file_, template)
Parse the Template and place the content of the editable regions of the template in a dictionary with the names of the ediatable regions as the keys.
  __getattr__(self, name)
Simulate attribute-access via editable region names.
  __getitem__(self, key)
Simulate indexed (tuple/list) and mapping-style access...
  __getslice__(self, i, j)
Simulate list/tuple slicing access...
  __repr__(self)
  __setattr__(self, name, value)
Simulate attribute-access via editable region names.
  __setitem__(self, key, value)
Simulate indexed (tuple/list) and mapping-style access...
  __setslice__(self, i, j, list)
Simulate list/tuple slicing access...
  __str__(self)
Returns a string containing the complete HTML page for printing...
  append(self, key, value)
Append value to the end of the editable region specified in key.
  asDictionary(self)
Return a dictionary containing the text in editable regions of the page as it stands with the names of the editable regions as the keys.
  asList(self)
Return the "list" as a real mapping...
  count(self, item)
Simulate list's methods...
  get(self, key)
Return the current value of the editable region "key".
  getTemplateRegion(self, key)
Return the current value of the region in the template specified by key if it exists.
  getTemplateRegions(self)
Return a dictionary of the Template Editable Regions as they stand...
  has_key(self, key)
Simulate mapping's methods...
  index(self, item)
Simulate list's methods...
  items(self)
Simulate mapping's methods...
  keys(self)
Simulate mapping's methods...
  output(self, file)
Merge the Editable Regions with the information in the Template to create the HTML page to be output.
  set(self, key, value)
Set the editable region specified by key to value.
  swapTemplatePaths(self, swapFrom, swapTo)
Used to change the text in the template (not in the Editable Regions).
  _findTemplateRegions(self)
Private method to extract the names and content of the editable regions from the template file.

Method Details

__init__(self, file_=None, template=None)
(Constructor)

Parse the Template and place the content of the editable regions of the template in a dictionary with the names
of the ediatable regions as the keys.

__getattr__(self, name)
(Qualification operator)

Simulate attribute-access via editable region names. Get the value of the ediable region "name".

__getitem__(self, key)
(Indexing operator)

Simulate indexed (tuple/list) and mapping-style access

__getslice__(self, i, j)
(Slicling operator)

Simulate list/tuple slicing access

__setattr__(self, name, value)

Simulate attribute-access via editable region names. Set the value of the editable region "name" to "value".

__setitem__(self, key, value)
(Index assignment operator)

Simulate indexed (tuple/list) and mapping-style access

__setslice__(self, i, j, list)
(Slice assignment operator)

Simulate list/tuple slicing access

__str__(self)
(Informal representation operator)

Returns a string containing the complete HTML page for printing

append(self, key, value)

Append value to the end of the editable region specified in key.

asDictionary(self)

Return a dictionary containing the text in editable regions of the page as it stands with the names of the
editable regions as the keys.

asList(self)

Return the "list" as a real mapping

count(self, item)

Simulate list's methods

get(self, key)

Return the current value of the editable region "key".

getTemplateRegion(self, key)

Return the current value of the region in the template specified by key if it exists.

getTemplateRegions(self)

Return a dictionary of the Template Editable Regions as they stand

has_key(self, key)

Simulate mapping's methods

index(self, item)

Simulate list's methods

items(self)

Simulate mapping's methods

keys(self)

Simulate mapping's methods

output(self, file=None)

Merge the Editable Regions with the information in the Template to
create the HTML page to be output. Returns the HTML

set(self, key, value)

Set the editable region specified by key to value.

swapTemplatePaths(self, swapFrom, swapTo)

Used to change the text in the template (not in the Editable Regions). Used to update the links and paths in the template to point to the correct URL

_findTemplateRegions(self)

Private method to extract the names and content of the editable regions from the template file.

Generated by Epydoc 2.0 on Mon Nov 10 15:08:05 2003 http://epydoc.sf.net